Methods and devices for generating a gas having two regions of different gas density, without mixing of the regions in space, are used in laser plasma accelerators (LPAs). The gas is used as a target in a LPA. A density transition in a gas that occurs over a short distance, which may be referred to as a sharp density transition, has been shown to aid electron injection in LPAs. The sharp density transition makes electron injection possible at millijoule (mJ) level laser energies with atmospheric to sub-atmospheric gas densities.